<?php

abstract class BasePresenter extends /*Nette\Application\*/Presenter{
	
	public $system;
	public $session;
	
	protected function beforeRender(){
		
	}
	
	protected function startup(){
		
		parent::startup();
		
		$this->session = Environment::getSession("web");
		
		$this->system = SystemModel::getInstance();
		
		$this->template->add("menu", $this->system->getMenuWeb());
		
		$a = Environment::getApplication()->getRequests();
		$item = $this->system->getMenuItemByName($a[0]->params[id]);
		
		$this->template->request = Environment::getHttpRequest();
		$this->template->languages = $this->system->getLanguages();
		$this->template->translation = $this->system->translation;
		$this->template->actual_language = $this->session->id_language;
		$this->template->navigation = $this->system->getNavigation();
		$this->template->add("title", $item[0]["name"]);
		$this->template->defaultTitle = Environment::getConfig('variable')->defaultTitle;
		$this->template->separator = Environment::getConfig('variable')->separator;
		
	}

}

?>